package com.xixiake.activity.fragment;

import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;

import com.xixiake.activity.MainActivity;

/**
 * Created by c-wanghengli on 2017/4/4.
 */
public abstract class Frame {

    private MainActivity mainActivity;

    private View contentView;

    public abstract View onCreateView(LayoutInflater inflater);

    protected void onCreate(){}

    protected void onResume(){}

    protected void onPause(){}

    protected void onDestory(){}

    protected void onActivityResult(int requestCode, int resultCode, Intent intent){}

    public final MainActivity getActivity(){return mainActivity;}

    void setActivity(MainActivity activity){this.mainActivity = activity;}

    void setContentView(View view){this.contentView = view;}

    View findViewById(int id){
        return contentView.findViewById(id);
    }


}
